package com.guli.mall.pms.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.guli.common.to.SpuAndSkuListTo;
import com.guli.common.utils.PageUtils;
import com.guli.mall.pms.entity.SpuInfoEntity;
import com.guli.mall.pms.entity.vo.SpuInfoImgVo;
import com.guli.mall.pms.entity.vo.SpuInfoWithNameVo;
import com.guli.mall.pms.entity.vo.productSpuAdd.JsonRootBean;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * spu信息
 *
 * @author 罗俊华
 * @email 1007052116@qq.com
 * @date 2020-09-17 11:37:22
 */
public interface SpuInfoService extends IService<SpuInfoEntity> {

    PageUtils queryPage(Integer currentPage, Integer size, Long spuId);

    void saveInfoDescAndImg(SpuInfoImgVo spuInfoImgVo);

    SpuInfoImgVo getSpuInfoImgById(Long spuInfoId);

    void spuAdd(JsonRootBean jsonRootBean);

    PageUtils<SpuInfoWithNameVo> searchSpuByCondition(SpuInfoEntity spuInfoEntity, Long currentIndex, Integer size);

    void updateByIdAndWriteToEs(SpuInfoEntity spuInfo);

    void upItem(Long skuId) throws ExecutionException, InterruptedException;

    Map<Long, SpuAndSkuListTo> getSpuAndSkuBySpuId(List<Long> spuIds);
}

